package org.zcl.rocketmq.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @Package org.zcl.consumer
 * @PROJECT_NAME: question
 * @DESCRIPTION:
 * @USER: zhuchenglin
 * @DATE: 2021/12/13 11:22
 */
@Slf4j
@Service
@RocketMQMessageListener(topic = "string-topic", consumerGroup = "my-consumer_string-topic")
public class TestConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        log.info("TestConsumer端接收到消息:{}", message);
    }
}
